<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Session练习</title>
</head>
<body>
	<%
		out.print("session id : " + session.getId() + "<br/>");
		out.print("getCreationTime : "
				+ new SimpleDateFormat("yyyy年M月dd日 hh:mm:ss").format(session.getCreationTime()) + "<br/>");
		out.print("LastAccessedTime : "
				+ new SimpleDateFormat("yyyy年M月dd日 hh:mm:ss").format(session.getLastAccessedTime()) + "<br/>");
		out.print("isNew : " + session.isNew() + "<br/>");
		session.setAttribute("session", "session_value");
		out.print("get Attribute : " + session.getAttribute("session")
				+ "<br/>");
		out.print("MaxInactiveInterval : "
				+ session.getMaxInactiveInterval() + "<br/>");
		session.setMaxInactiveInterval(60);
		out.print("MaxInactiveInterval : "
				+ session.getMaxInactiveInterval() + "<br/>");
	%>
</body>
</html>